# eric7.Plugins.CheckerPlugins.CodeStyleChecker.Annotations.AnnotationsDeprecationsVisitor

Module implementing a node visitor for checking the use of deprecated 'typing' symbols.

### Global Attributes

None

### Classes

AnnotationsDeprecationsVisitor | Class implementing a node visitor for checking the use of deprecated 'typing' symbols.

### Functions

None

## AnnotationsDeprecationsVisitor

Class implementing a node visitor for checking the use of deprecated 'typing' symbols.

### Derived from

ast.NodeVisitor

### Class Attributes

NameReplacements
visit_AsyncFunctionDef

### Class Methods

None

### Methods

AnnotationsDeprecationsVisitor | Constructor
__checkDeprecation | Private method to check, if the given name is deprecated.
getIssues | Public method to get the list of detected issues.
visit_AnnAssign | Public method to handle an ast.AnnAssign node.
visit_Attribute | Public method to handle an ast.Attribute node.
visit_FunctionDef | Public method to handle an ast.FunctionDef or ast.AsyncFunctionDef node.
visit_Import | Public method to handle an ast.Import node.
visit_ImportFrom | Public method to handle an ast.ImportFrom node.

### Static Methods

None

#### AnnotationsDeprecationsVisitor (Constructor)

AnnotationsDeprecationsVisitor(exemptedList)

Constructor

exemptedList (list of str)
  list of typing symbols exempted from checking

#### AnnotationsDeprecationsVisitor.__checkDeprecation

__checkDeprecation(node, name)

Private method to check, if the given name is deprecated.

node (ast.ImportFrom, ast.Attribute)
  reference to the node
name (str)
  name to be checked

#### AnnotationsDeprecationsVisitor.getIssues

getIssues()

Public method to get the list of detected issues.

Return:
  list of detected issues consisting of a tuple of a reference to the node and a tuple containing the used name and the suggested replacement

Return Type:
  list of tuples of (ast.AST, (str, str))

#### AnnotationsDeprecationsVisitor.visit_AnnAssign

visit_AnnAssign(node)

Public method to handle an ast.AnnAssign node.

node (ast.AnnAssign)
  reference to the node to be handled

#### AnnotationsDeprecationsVisitor.visit_Attribute

visit_Attribute(node)

Public method to handle an ast.Attribute node.

node (ast.Attribute)
  reference to the node to be handled

#### AnnotationsDeprecationsVisitor.visit_FunctionDef

visit_FunctionDef(node)

Public method to handle an ast.FunctionDef or ast.AsyncFunctionDef node.

node (ast.FunctionDef or ast.AsyncFunctionDef)
  reference to the node to be handled

#### AnnotationsDeprecationsVisitor.visit_Import

visit_Import(node)

Public method to handle an ast.Import node.

node (ast.Import)
  reference to the node to be handled

#### AnnotationsDeprecationsVisitor.visit_ImportFrom

visit_ImportFrom(node)

Public method to handle an ast.ImportFrom node.

node (ast.ImportFrom)
  reference to the node to be handled

Up